﻿@model webapps.homefinance.Models.Planning

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>New Plan</legend>

        <div class="editor-label">
            @Html.LabelFor(model => model.name, "Brief Description")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.name)
            @Html.ValidationMessageFor(model => model.name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.categoryId, "Category")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.categoryId)
            @Html.ValidationMessageFor(model => model.categoryId)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.value, "Value")
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.value)
            @Html.ValidationMessageFor(model => model.value)
        </div>

        <div class="group">
            <div class="fl">
                <div class="editor-label">
                    @Html.LabelFor(model => model.dateBegin, "Payment Date")
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.dateBegin)
                    @Html.ValidationMessageFor(model => model.dateBegin)
                </div>
            </div>
            <div class="fl">
                <div class="editor-label">
                    @Html.LabelFor(model => model.dateBegin, "Remind me")
                </div>
                <div class="editor-field">
                    @Html.CheckBox("warnme")
                </div>
            </div>
            <div class="clear"></div>
        </div>

        <div class="group">
            <div class="fl">
                <div class="editor-label">
                    @Html.LabelFor(model => model.repetitionMethodId, "Does it repeats?")
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.repetitionMethodId)
                    @Html.ValidationMessageFor(model => model.repetitionMethodId)
                </div>
            </div>
            <div class="fl">
                <div class="editor-label">
                    @Html.LabelFor(model => model.NuMeses, "How many times?")
                </div>
                <div class="editor-field">
                    @Html.EditorFor(model => model.NuMeses)
                    @Html.ValidationMessageFor(model => model.NuMeses)
                </div>
            </div>
            <div class="clear"></div>
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
